package com.yz.admin.mapper;

import com.sun.activation.registries.LogSupport;
import com.yz.common.pojo.LogSheet;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface LogMapper {

    @Insert("insert into t_logsheet(operator,operationDate,operationMethod,operationResult,methodName) values(#{operator},#{operationDate},#{operationMethod},#{operationResult},#{methodName})")
    public void insertLog(LogSheet logSheet);

    @Select("select * from t_logsheet ORDER BY operationDate DESC limit #{pageIndex},#{pageSize}")
    List<LogSheet> findAllLog(@Param("pageIndex") Integer pageIndex, @Param("pageSize") Integer pageSize);

    @Select("select count(1) from t_logsheet")
    Integer findLogCount();
}
